package com.weiweiqin.controller.home;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.weiweiqin.service.GoodsService;

@Controller
public class SkipController {
	
	@Autowired
	private GoodsService goodsService;
	@RequestMapping(value = "/", method = { RequestMethod.POST,
			RequestMethod.GET })
	public String index(HttpServletRequest request) {
//		request.setAttribute("id",29);
//		String keys = goodsService.getKeysById(29);
//		request.setAttribute("keys", keys);
		return "wechat/index";
	}
	
//	@RequestMapping(value = "/mobile", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String mobile(HttpServletRequest request) {
//		request.getSession().setAttribute("mobile","mobile");
//		return "indexm";
//	}
//
//	@RequestMapping(value = "/test", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String test(HttpServletRequest request) {
//		request.getSession().setAttribute("mobile","mobile");
//		return "redirect:/#/cart";
//	}
//
//	@RequestMapping(value = "/shop", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String shop(HttpServletRequest request) {
//		request.getSession().setAttribute("mobile","mobile");
//		return "m";
//	}
//
//	@RequestMapping(value = "/addp", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String addp(HttpServletRequest request) {
//		request.getSession().setAttribute("mobile","addp");
//		return "m";
//	}
//
//	@RequestMapping(value = "/jordan", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String jordan4(HttpServletRequest request) {
//		request.getSession().setAttribute("mobile","mobile");
//		return "jordan4";
//	}
//
//	@RequestMapping(value = "/m", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String m(HttpServletRequest request) {
//		request.getSession().setAttribute("mobile","mobile");
//		return "m";
//	}
//
//	@RequestMapping(value = "/wx", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String wx(HttpServletRequest request) {
//		request.getSession().setAttribute("mobile","weixin");
//		return "indexWeixin";
//	}
//
//	@RequestMapping(value = "/spring", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String spring() {
//		return "spring";
//	}
//
//	@RequestMapping(value = "/groupbuy", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String groupbuy() {
//		return "groupbuy";
//	}
//
//	@RequestMapping(value = "/detailGoods/{id}", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String detailGoods(@PathVariable int id,HttpServletRequest request) {
//		request.setAttribute("id",id);
//		String keys = goodsService.getKeysById(id);
//		request.setAttribute("keys", keys);
//		return "detailGoods";
//	}
//
//	@RequestMapping(value = "/detailGoodsS/{id}", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String detailGoodsS(@PathVariable int id,HttpServletRequest request) {
//		request.setAttribute("id",id);
//		String keys = goodsService.getKeysById(id);
//		request.setAttribute("keys", keys);
//		return "singleDetail";
//	}
//
//	@RequestMapping(value = "/order.php/{id}", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String quickOrder(@PathVariable int id,HttpServletRequest request) {
//		request.setAttribute("id",id);
//		return "shoesShopOrder";
//	}
//
//	@RequestMapping(value = "/detailGoodsD/{id}", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String detailGoodsD(@PathVariable int id,HttpServletRequest request) {
//		request.setAttribute("id",id);
//		String keys = goodsService.getKeysById(id);
//		request.setAttribute("keys", keys);
//		return "detailGoodsShop";
//	}
//
//	@RequestMapping(value = "/pdetailGoods/{id}", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String pdetailGoods(@PathVariable int id,HttpServletRequest request) {
//		request.setAttribute("id",id);
//		String keys = goodsService.getKeysById(id);
//		request.setAttribute("keys", keys);
//		return "pc/pdetailGoods";
//	}
//
//	@RequestMapping(value = "/paddCart/{id}/{num}", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String paddCart(@PathVariable int id,@PathVariable int num,HttpServletRequest request) {
//		request.setAttribute("id",id);
//		request.setAttribute("num",num);
//		return "pc/paddCart";
//	}
//
//
//	@RequestMapping(value = "/pcart", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String pcart() {
//		return "pc/pcart";
//	}
//
//	@RequestMapping(value = "/orderGoods", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String orderGoods() {
//		return "orderGoods";
//	}
//
//	@RequestMapping(value = "/addCart/{id}/{num}", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String addCart(@PathVariable int id,@PathVariable int num,HttpServletRequest request) {
//		request.setAttribute("id",id);
//		request.setAttribute("num",num);
//		return "addCart";
//	}
//
//	@RequestMapping(value = "/cart", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String cart() {
//		return "cart";
//	}
//
//	@RequestMapping(value = "/goPay/{outerid}", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String goPay(@PathVariable String outerid,HttpServletRequest request) {
//		request.setAttribute("outerid",outerid);
//		return "goPay";
//	}
//
//	@RequestMapping(value = "/fashion", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String fashion() {
//		return "fashion";
//	}
//
//	@RequestMapping(value = "/register", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String register() {
//		return "register";
//	}
//
//	@RequestMapping(value = "/pregister", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String pregister() {
//		return "pc/pregister";
//	}
//
//
//	@RequestMapping(value = "/registerActive", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String registerActive(){
//		return "registerActive";
//	}
//
//	@RequestMapping(value = "/login", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String login(){
//		return "login";
//	}
//
//	@RequestMapping(value = "/plogin", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String plogin(){
//		return "pc/plogin";
//	}
//
//	@RequestMapping(value = "/about", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String about(){
//		return "about";
//	}
//
//	@RequestMapping(value = "/pabout", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String pabout(){
//		return "pc/pabout";
//	}
//
//	@RequestMapping(value = "/contract", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String contract(){
//		return "contract";
//	}
//
//	@RequestMapping(value = "/pcontract", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String pcontract(){
//		return "pc/pcontract";
//	}
//
//	@RequestMapping(value = "/contractm", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String contractm(){
//		return "contractm";
//	}
//
//	@RequestMapping(value = "/settlement", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String settlement(){
//		return "settlement";
//	}
//
//	@RequestMapping(value = "/settlementLogined", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String settlementLogined(){
//		return "settlementLogined";
//	}
//
//	@RequestMapping(value = "/agreement", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String agreement(){
//		return "agreement";
//	}
//
//	/**
//	 * 当前，是否从首页点击进来
//	 * @param current
//	 * @param request
//	 * @return
//	 */
//	@RequestMapping(value = "/hot", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String hot(Integer current,HttpServletRequest request){
//		if(null != current){
//			request.setAttribute("current", current);
//		}
//		return "hot";
//	}
//
//	@RequestMapping(value = "/discount", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String discount(Integer current,HttpServletRequest request){
//		if(null != current){
//			request.setAttribute("current", current);
//		}
//		return "discount";
//	}
//
//	@RequestMapping(value = "/pdiscount", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String pdiscount(Integer current,HttpServletRequest request){
//		if(null != current){
//			request.setAttribute("current", current);
//		}
//		return "pc/pdiscount";
//	}
//
//	@RequestMapping(value = "/psettlement", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String psettlement(){
//		return "pc/psettlement";
//	}
//
//	@RequestMapping(value = "/psettlementLogined", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String psettlementLogined(){
//		return "pc/psettlementLogined";
//	}
//
//	@RequestMapping(value = "/springCoat", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String springCoat(Integer current,HttpServletRequest request){
//		if(null != current){
//			request.setAttribute("current", current);
//		}
//		return "springCoat";
//	}
//
//	@RequestMapping(value = "/shirt", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String shirt(Integer current,HttpServletRequest request){
//		if(null != current){
//			request.setAttribute("current", current);
//		}
//		return "shirt";
//	}
//
//	@RequestMapping(value = "/fashionTrousers", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String fashionTrousers(Integer current,HttpServletRequest request){
//		if(null != current){
//			request.setAttribute("current", current);
//		}
//		return "fashionTrousers";
//	}
//
//	@RequestMapping(value = "/stunningButterfly", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String stunningButterfly(){
//		return "stunningButterfly";
//	}
//
//	@RequestMapping(value = "/success", method = { RequestMethod.POST,
//			RequestMethod.GET })
//	public String success(){
//		return "success";
//	}
	
}
